<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 水仙花数: 个数的立方 + 十位数的立方 + 百位数的立方 == 原数

      for (var i = 100; i < 1000; i++) {
        var ge = i % 10;
        var bai = Math.floor(i / 100);

        var shi = Math.floor((i % 100) / 10);
        if (Math.pow(ge, 3) + Math.pow(shi, 3) + Math.pow(bai, 3) == i) {
          console.log(i);
        }
      }
    </script>
  </body>
</html>
